import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("1",1);
        map.put("2",2);
        map.put("3",3);
        map.put("4",4);
        map.put("5",5);
        map.put("6",6);
        map.put("7",6);
        System.out.println(map.get("1"));
        System.out.println(map.getOrDefault("7", -1));
        map.remove("1");
        System.out.println(map.keySet());
        System.out.println(map.values());
        System.out.println(map.entrySet());

        Set<Integer> set = new HashSet<Integer>();
        set.add(1);
        set.add(2);
        set.add(3);
        set.add(4);
        set.add(5);
        set.add(5);
        set.remove(5);
        System.out.println(set.size());
        System.out.println(set.isEmpty());
        System.out.println(set.contains(2));

    }
}